<?php
  require_once("../../conf/glob_conf.php");
  require_once("lib/memb_conf.php");
  require_once 'LiveUser/Admin.php';
  $admin =& LiveUser_Admin::factory($conf);
  $admin->init();
      $now =  date("Y-m-d");
      $data = array(
        'handle' => 'nh' . rand(),
        'passwd' => 'nh',
        'regDate' => $now,
        'perm_type' => 1,
    );

    $user_id = $admin->addUser($data);
    if ($user_id === false) {
        echo '<strong>Error on line: '.__LINE__.'</strong><br />';
        print_r($admin->getErrors());
    } else {
        echo 'Created User Id <strong>' . $user_id . '</strong><br />';
    }
?>
